my $a = "111M-111";
$a =~ /(.*)-(.*)/;
my $aa = $1;
my $aaa = $2;
my $b = ($aa =~ /M/?$aaa:$aa);

print $b,"\n";
